/* 
 * 发现板块点赞相关功能
*/

import { axios } from "@/request/request";

/**
 * 获取发现板块点赞数以及当前用户是否点赞
 * @param {post_id} //帖子Id
 * @param {username} //用户名
 */
 export const getLikeForFind = (params)=>{
    return axios({
      url: `/getFindLikeNumber?id=${params.post_id}&username=${params.username}`,
      method: "get",
      data:params
    });
  }
  
  
  /**
   * 发现模块的点赞功能
   * @param {post_id} //帖子Id
   * @param {username} //用户名
   */
  export const clickLike = (params) =>{
    return axios({
      url:'/giveItemLike',
      method:"put",
      data:params
    })
  }

 /**
 * 修改视频/文章评论点赞
 * @returns {object}
 */
export const changeLike = (params) => {
  return axios({
    url: "/changeVideoCommentLike",
    method: "post",
    data:params
  });
};